﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace Help
{
    public static class FuZhi<T> where T : class,new()
    {
        /// <summary>
        /// 因无法跟踪的所以要重赋值实体
        /// </summary>
        /// <param name="Tar"></param>
        /// <param name="Org"></param>
        public static void FZ(ref T Tar, T Org)
        {
            Type tp = typeof(T);
            PropertyInfo[] pr = tp.GetProperties();
            foreach (PropertyInfo item in pr)
            {
                object bb = item.GetValue(Org, null);
                item.SetValue(Tar, bb, null);
            }
        }
    }
}
